//
//  FBPublicNumberController.m
//  yameishe3
//
//  Created by pro on 2017/3/10.
//  Copyright © 2017年 yameishe. All rights reserved.
//

#import "FBPublicNumberController.h"
#import "MicroMarketingEditView.h"
#define editViewH 950
@interface FBPublicNumberController ()<UIScrollViewDelegate>
{
    __weak IBOutlet UIScrollView *_scrollView;
    MicroMarketingEditView *_editView;
}
@end

@implementation FBPublicNumberController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self controllerSetting];
    _editView = [[[NSBundle mainBundle]loadNibNamed:@"MicroMarketingEditView" owner:self options:nil] firstObject];
    _editView.frame = CGRectMake(0, 0, _scrollView.width, ScreenHeight);
    [_scrollView addSubview:_editView];
    [_editView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_scrollView);
        make.leading.trailing.equalTo(self.view);
        make.height.equalTo(@(editViewH));
    }];
    _scrollView.contentSize = CGSizeMake(0, editViewH);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark UIScrollViewDelegate
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{
    
    for (UIView *view in _editView.subviews) {
        for (UIView * subView in view.subviews) {
            [subView resignFirstResponder];
        }
        [view resignFirstResponder];
    }
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
